#!/bin/bash
sed -i "s/##MYSQL_USER##/${MYSQL_USER:-llsuser}/" mysqldump.cnf
sed -i "s/##MYSQL_PASSWORD##/${MYSQL_PASSWORD:-llsuser}/" mysqldump.cnf
sed -i "s/##MYSQL_HOST##/${MYSQL_HOST:-llsuser}/" mysqldump.cnf
sed -i "s/##MYSQL_PORT##/${MYSQL_PORT:-llsuser}/" mysqldump.cnf
cat <<EOF > /etc/mysql/conf.d/mysqldump.cnf
[client]
user = ${MYSQL_USER:-root}
password = ${MYSQL_PASSWD:-LLSuser@2022}
host = ${MYSQL_HOST:-127.0.0.1}
port = ${MYSQL_PORT:-3306}
EOF

python3 app.py
